package com.lt.lease.common.utils;

import java.util.Random;

/**
 * @author 06 2024/6/6
 */
public class CodeUtil {
    public static String getRandomCode(Integer length) {
        StringBuilder stringBuilder = new StringBuilder();
        Random random = new Random();
        for (int i = 0; i<length;i++){
            int num = random.nextInt(10);
            stringBuilder.append(num);
        }
        return stringBuilder.toString();

    }
}
